package com.anda.jsu.yangsp.core.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.anda.jsu.yangsp.core.persistence.IBaseDao;

/**
 * 
 * @author xiaolu
 * @since 2012-12-06
 *
 */
@Service("baseService")
public class BaseServiceImpl implements IBaseService {
	@Autowired
	IBaseDao baseDao;

	public void delete(Object o) {
		baseDao.delete(o);
	}

	public void deleteAll(Collection lists) {
		baseDao.deleteAll(lists);
	}

	public void deleteObject(Class clazz, Serializable id) {
		baseDao.deleteObject(clazz, id);
	}

	public Object findById(Class clazz, Serializable id) {
		return baseDao.findById(clazz, id);
	}

	public List listAll(Class clazz) {
		return baseDao.listAll(clazz);
	}

	public void save(Object o) {
		baseDao.save(o);
	}

	public void saveAll(Collection lists) {
		baseDao.saveAll(lists);
	}

	public void saveOrUpdate(Object o) {
		baseDao.saveOrUpdate(o);
	}

	public void update(Object o) {
		baseDao.update(o);
	}

}
